package architect.design.patterns.creation.singleton;

/**
 * 提前初始化单例
 *
 * @author guanxin
 * @date 2018/5/4 11:02
 */

public class EagerSingleton {

    private static final EagerSingleton INSTANCE = new EagerSingleton();

    // 私有构造函数，避免被客户端代码使用
    private EagerSingleton() {}

    public static EagerSingleton getInstance() {
        return INSTANCE;
    }
}
